pub mod solution;
use crate::solution::*;

#[allow(unused)]
fn part1() {
    let contents = std::fs::read_to_string("./day09/input.txt").unwrap();

    let mut sum: i64 = 0;
    for line in contents.lines() {
        let nums = get_numbers(line);
        let res = extrapolate_numbers(nums);
        let history = get_history_part1(res);
        sum += history;
    }
    println!("{sum}");
}

#[allow(unused)]
fn part2() {
    let contents = std::fs::read_to_string("./day09/input.txt").unwrap();

    let mut sum: i64 = 0;
    for line in contents.lines() {
        let nums = get_numbers(line);
        let res = extrapolate_numbers(nums);
        let history = get_history_part2(res);
        sum += history;
    }
    println!("{sum}");
}

fn main() {
    part2();
}
